Skip to content

Conversation

@LucasYuki
Copy link
Contributor

@LucasYuki LucasYuki commented Dec 31, 2025

Closes #8700

image

Changes:

  • The "Go to position" dialog only changes the position when the "Goto" button is pressed.
  • Adds the "Update" button to update the values of the current view.
  • Changes the LayoutViewer::zoomTo padding calculations to make it easier to calculate the inverse operation.
  • Adds the method LayoutViewer::getVisibleDiameter() to get the current view size.

@LucasYuki LucasYuki requested review from gadfort and maliberty and removed request for gadfort December 31, 2025 01:43
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several valuable improvements to the GUI's "Go to position" functionality. Separating the 'Update' and 'Goto' actions is a great enhancement for user experience. The refactoring of the zoom padding calculation in LayoutViewer::zoomTo and the addition of LayoutViewer::getVisibleDiameter to invert this operation are well-conceived. However, I've identified a logical issue in the implementation of getVisibleDiameter related to how scrollbar dimensions are handled, which will lead to incorrect calculations. My review includes a detailed comment and a suggested fix for this issue.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: LucasYuki <[email protected]>
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@maliberty
Copy link
Member

I'm holding of reviewing until you make the changes to the update button we discussed.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

clang-tidy review says "All clean, LGTM! 👍"

@maliberty
Copy link
Member

maliberty commented Jan 9, 2026

If I switch to 'Show DBU' it is should use integers (shows microns & dbus for the same values)
image
image

@maliberty
Copy link
Member

An oddity is that if I enter Size=5 and hit goto I get a slightly different value. I am not hitting the edges of the area
image
image

@LucasYuki
Copy link
Contributor Author

An oddity is that if I enter Size=5 and hit goto I get a slightly different value. I am not hitting the edges of the area image image

Unfortunately, there are integer conversions that introduce errors from the requested size (float) to the view (pixels), so the inverse function is a little bit inaccurate.

Signed-off-by: LucasYuki <[email protected]>
@LucasYuki
Copy link
Contributor Author

If I switch to 'Show DBU' it is should use integers (shows microns & dbus for the same values) image image

The GUI already does the conversion automatically.
The method GotoLocationDialog::updateUnits was doing the conversion again, so I removed it.

@LucasYuki LucasYuki requested a review from maliberty January 12, 2026 17:01
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

&LayoutTabs::viewUpdated,
goto_dialog_,
&GotoLocationDialog::updateUnits);
&GotoLocationDialog::updateLocation);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "gui::GotoLocationDialog" is directly included [misc-include-cleaner]

src/gui/src/mainWindow.cpp:20:

- #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ #include "src/gotoDialog.h"
+ #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)

@maliberty
Copy link
Member

Please fix the tidy

Signed-off-by: LucasYuki <[email protected]>
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@maliberty maliberty merged commit c57e620 into The-OpenROAD-Project:master Jan 12, 2026
13 checks passed
@LucasYuki LucasYuki deleted the gui_goto branch January 12, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gui: "Go to position" bug

2 participants